import React, { useEffect, useState } from 'react';
import Item from '../Item/item'
import axios from 'axios'
import './index.css'
const Index = () => {
    const [mv, setMv] = useState([])
    const getHttp = async () => {
        var res = await axios.get("http://122.112.161.135:3000/mv/first")
        console.log(res.data.data);
        setMv(res.data.data)
    }
    useEffect(() => {
        getHttp()
    }, [])
    return (
        <div className='container'>
            {mv.map(item => {
                return (
                    <Item data={item} key={item.id}>
                        <div className='img'><img src={item.cover} alt="" /></div>
                    </Item>
                )
            })}

        </div>
    );

}

export default Index;
